package itheima.d05;

public class test {
    public static void main(String[] args) {

        Dog a = new Dog();
        a.eat();

        Animal c=new Animal() {
            @Override
            public void eat() {
                System.out.println("吃东西");

            }
        };

        Animal pig=() -> {System.out.println("吃饲料");
        };
        pig.eat();
    }
}
